package com.shujia.mr.jieba;

import com.huaban.analysis.jieba.JiebaSegmenter;
import com.huaban.analysis.jieba.SegToken;

import java.util.List;

public class Test {
    public static void main(String[] args) {

        JiebaSegmenter jiebaSegmenter = new JiebaSegmenter();

        //public List<SegToken> process(String paragraph, SegMode mode)
        List<SegToken> tokens = jiebaSegmenter.process("今天我在安徽合肥兰智数加科技有限公司学习大数据相关知识", JiebaSegmenter.SegMode.INDEX);

        String[] strs = {"D:\\projects\\IdeaProjects\\bigdata32\\hadoop\\data\\dicts.txt"};
        jiebaSegmenter.initUserDict(strs);

        for (SegToken token : tokens) {
            System.out.println(token.word);
        }
    }
}
